/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: syyyy
 * Date: 2025-07-06
 * Time: 22:56
 */
class OutClass {

    //System.out.println("lalalla");第一句不能用普通字段
    public int data1 = 1;
    private int data2 = 2;
    public static int data3 = 3;

    //静态内部类
    static class InnerClass {
        public int data4 = 4;
        private int data5 = 5;
        public static  int data6 = 6;

        public void test() {
            OutClass outClass = new OutClass();
            System.out.println(outClass.data1);
            System.out.println(data3);
            System.out.println(OutClass.data3);//跟上面那个是一样的
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data6);
            System.out.println("test方法执行了....");
        }
    }

}

public class Test{
    public static void main(String[] args) {
        OutClass.InnerClass inner=new OutClass.InnerClass();
        //System.out.println(OutClass.InnerClass.data6);
        inner.test();
    }
}
